<script setup lang="ts" name="typeImg">
defineProps<{
  data: {
    name: string
    url: string
  }
}>()

// 移除方法
const emit = defineEmits(['removeData'])
</script>

<template>
  <div ref="comtentImgTemplate" class="contentImgCollection">
    <img class="blockImg" :src="data.url" />
    <Close class="closeImg" @click="emit('removeData', data.name)" />
  </div>
</template>

<style scoped>
.blockImg {
  width: 80%;
  object-fit: contain;
}
</style>
